package com.zbb.comm.controller;

import com.zbb.comm.po.CroupChatContact;
import com.zbb.comm.po.CroupChatContactVo;
import com.zbb.comm.service.CroupChatContactsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author itcast
 */
@Slf4j
@RestController
@RequestMapping("croupChatContacts")
@Api(value = "群聊消息联系人",tags = "获取群聊消息联系人信息")
public class CroupChatContactsController {

    @Autowired
    private CroupChatContactsService  croupChatContactsService;

    @ApiOperation("获取群聊消息联系人信息查询接口")
    @GetMapping("/croupUsers")
    public List<CroupChatContactVo> selectCroupByUserId(String userId){
        List<CroupChatContactVo> croupChatContacts = croupChatContactsService.selectCroupById(userId);
        return croupChatContacts;
    }
}
